var express = require('express');
var router = express.Router();
var Floor = require("../models/floor");


//获取广告数据
router.get('/', function(req, res, next) {
    var model = Floor.find({freeze:true});
    model.exec(function(err,result){
        if(err){
            res.json({
                status:"1",
                msg:err.message
            })
        }else{
            res.json({
                status:"0",
                msg:"",
                result:{
                    count:result.length,
                    list:result
                }
            })
        }
    });
});


module.exports = router;
